import argparse
import re
import line_profiler
import sys
def py_lines(file_path):
    num_d = 0
    num_k = 0
    num_z = 0

    ct_condition = re.compile(r'^\s*#')
    with open(file_path, 'r', encoding='utf-8') as py_file:
        for line in py_file:
            line = line.strip()
            if not line:
                num_k += 1
            elif ct_condition.match(line):
                num_z += 1
            else:
                num_d += 1
    return num_d, num_z, num_k

def main():

    profile_1 = line_profiler.LineProfiler(py_lines)
    profile_1.enable()
    py_lines('test.py')
    profile_1.disable()
    profile_1.print_stats(sys.stdout)

if __name__ == "__main__":
    main()
